Clinical Trials Process API - Implementation Template

(0 reviews)

Setup guide

Prerequisites

Veeva CTMS Configuration

Create a custom object named extract_config__c and insert the object names and its field in the table for CTMS Full load and Delta load uses this custom object to retrieve the objects data from CTMS.

Creating a custom object in Veeva

  1. Login into the Veeva CTMS system.
  2. Navigate Admin (Top Right side, Gear Icon) --> Configuration --> OBJECT SETUP --> Objects.
  3. Click on Create button and provide following details.

    • Object Label : extract config.
    • Object Plural Label: extract configs.
    • Object Name : extract_config.
    • Status : Active.
    • Under Options : Enable Audit data changes in this object and any others optionally.
    • Lifecycle : Select/create appropriate Lifecycle. Example: Study Organization Lifecycle.
  4. Click on `Save' button.

  5. Navigate to Fields tab, click on Create button to create the following fields.

    • object_name - Select field type as Text and Maximum Length of 50 chars. This field will have the actual name of the Veeva CTMS object. Example: subject__clin or study__v.
    • isactive - Select field type as Yes/No. This field will determine whether the data for the particular object to be retrieved.
    • extract_fields - Select field type as Text and Maximum Length of 2000 chars. This field will have the list of all fields to be extracted from an object with a delimiter of ',' (comma). Example: name__v, study__clin.
    • relationship_fields - Select field type as Text and Maximum Length of 1500 chars. This field will have the list of all relationship fields to be extracted from an object with a delimiter of ',' (comma). Ex value: study__clinr.name__v,arm__vr.name__v.
    • hasPicklist - Select field type as Yes/No. This field will determine whether the extract_fields in an object has any picklists.
    • picklist_names - Select field type as Text and Maximum Length of 1500 chars. This field will have the list of picklist names for the picklist fields in an object with a delimiter of '~'. Example: status__v ~ default_status__v.

Importing Templates into Anypoint Studio

  1. In Studio, click the Exchange X icon in the upper left of the taskbar.
  2. Log in with your Anypoint Platform credentials.
  3. Search for the template.
  4. Click Open.

Common Configuration

  • mule.env - sets the environment where the application is to be deployed. For a studio deployment, the recommended mule.env value is local.
  • mule.key - sets the encryption password to be used for encrypting secure properties. Update as needed.
  • api.autodiscoveryID should be configured in config-<mule.env>.yaml file.

Please refer to the attached link on how to secure the configuration properties.

HTTPS Configuration

  • https.host — sets the service host interface. It should be configured in config-<mule.env>.yaml file. (Defaults to 0.0.0.0 for all interfaces).
  • https.port — sets the HTTPS service port number. It should be configured in config-<mule.env>.yaml file. (Default 8082).
  • TLS Configuration - Keystore properties setup:
    • keystore.alias - sets the alias to the keystore. It should be configured in config-<mule.env>.yaml file.
    • keystore.path - sets the path to the key file. Key should be availabe in /src/main/resources/keystore. It should be configured in config-<mule.env>.yaml file.
    • keystore.keypass — sets keystore keypass to support HTTPS operation. It should be encrypted and configured in config-secured-<mule.env>.yaml file.
    • keystore.password— sets keystore password to support HTTPS operation. It should be encrypted and configured in config-secured-<mule.env>.yaml file.

Please refer to the attached link on how to generate the Keystore.

Clinical Trials Application Configuration

The application requires a few things to be configured, mainly the multiple system API connections information. Configure them in the properties file located in the config/properties folder.

  • veeva.ctms-sys-api.host should be configured in config-<mule.env>.yaml file. URL for an instance of Veeva CTMS.

  • veeva.cdms-sys-api.host should be configured in config-<mule.env>.yaml file. URL for an instance of Veeva CDMS.

  • veeva.cdms-sys-api.extractUrl should be configured in config-<mule.env>.yaml file for your specific Veeva CDMS instance's url of Submit Extract Job request URL.
  • veeva.cdms-sys-api.jobStatusUrl should be configured in config-<mule.env>.yaml file for your specific Veeva CDMS instance's url of Job Status request URL.
  • veeva.cdms-sys-api.studiesUrl should be configured in config-<mule.env>.yaml file for your specific Veeva CDMS instance's url of Studies request URL.
  • veeva.cdms-sys-api.cdmsDemograhics should be configured in config-<mule.env>.yaml file for a custom name of CDMS demographics dataset.
  • veeva.cdms-sys-api.cdmsVitalSigns should be configured in config-<mule.env>.yaml file for a custom name of CDMS vital signs dataset.
  • veeva.cdms-sys-api.cdmsDemograhics should be configured in config-<mule.env>.yaml file for a custom name of CDMS physical exam dataset.
  • veeva.cdms-sys-api.cdmsSubjects should be configured in config-<mule.env>.yaml file for a custom name of CDMS subjects dataset.
  • veeva.cdms-sys-api.cdmsAdverseEvents should be configured in config-<mule.env>.yaml file for a custom name of CDMS adverse events dataset.
  • veeva.cdms-sys-api.extactFileName should be configured in config-<mule.env>.yaml file for a custom name of the resultant export file from CDMS.
  • veeva.cdms-sys-api.extactFileType should be configured in config-<mule.env>.yaml file for a custom name of the resultant export file type from CDMS.
  • veeva.cdms-sys-api.veevaAPIVersion should be configured in config-<mule.env>.yaml file for Veeva CDMS Rest API version.

  • scheduler.ctms.full-load should be configured in config-<mule.env>.yaml file. Modify to match the schedule desired for CTMS full load.

  • scheduler.ctms.delta-load should be configured in config-<mule.env>.yaml file. Modify to match the schedule desired for CTMS delta load.
  • scheduler.ctms.delta-load-default-from-datatime should be configured in config-<mule.env>.yaml file. Modify to match the schedule desired for CTMS delta load uses this data as from date.
  • scheduler.cdms.full-load should be configured in config-<mule.env>.yaml file. Modify to match the schedule desired for CDMS full load.

  • target-sys-api.host should be configured in config-<mule.env>.yaml file. URL for your instance of target system api.

  • target-sys-api.path should be configured in config-<mule.env>.yaml file. Target Sys API's resource end point.

  • anypoint-mq.server-url should be configured in config-<mule.env>.yaml file. Provide a URL for your instane of the mq server end point.

  • anypoint-mq.client-id should be configured in config-<mule.env>.yaml file. Provide a client-id for your instance of mq queue name.
  • anypoint-mq.ctms-queue-name should be configured in config-<mule.env>.yaml file. Provide a queue name to be used for CTMS job details.
  • anypoint-mq.cdms-queue-name should be configured in config-<mule.env>.yaml file. Provide a queue name to be used for CDMS job details.
  • anypoint-mq.msgDelayInSec should be configured in config-<mule.env>.yaml file. Provide a custom value to delay message publish to the job details queue.
  • anypoint-mq.cdms-polling-intervalInSec should be configured in config-<mule.env>.yaml file. Provide a custom value to set a polling interval for CDMS queue.
  • anypoint-mq.cdms-polling-size should be configured in config-<mule.env>.yaml file. Provide a custom value to set polling size for CDMS job details queue.

Tested and verified

This solution was developed and tested on Anypoint Studio 7.15 and Mule Runtime 4.4.0.

Run it

  1. Right-click the template project folder.
  2. Hover your mouse over 'Run as'.
  3. Click Mule Application (configure).
  4. Inside the dialog, select Environment and set the variable mule.env to the appropriate value (dev or local).
  5. Inside the dialog, select Environment and set the variable mule.key to the property encryption key that you used to encrypt your secure properties.
  6. Click Run.

Deployment instructions for CloudHub using provided scripts

Ensure the Maven profile CloudHub-DEV has been properly configured in your settings.xml file. Reference can be found by downloading the Accelerator Common Resources asset. Additional instructions are available in the Getting Started with MuleSoft Accelerators - Build Environment guide.

Update the config-<env>.yaml properties appropriately and then use one of the following scripts to deploy the application to CloudHub:

  • packageDeploy.sh or deployOnly.sh (Mac/Linux).
  • packageDeploy.cmd or deployOnly.cmd (Windows).

Test the template

  • Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a Postman collection in the src/test/resources folder.

Reviews

TypeTemplate
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onNov 2, 2023
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.3
1.0.2
1.0.1
1.0.0